package com.tbit.main.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * 敏感操作密码
 *
 * @author Leon
 * 2017年7月24日 下午3:43:06
 */
@Configuration
@RefreshScope
public class OperaPswConstant {

    /**
     * 管理员密钥
     */
    public static String ADMIN_OPERA_PSW = "QWERTYUIOP";
    /**
     * 各类卡操作密钥，修改订单金额，用户余额礼品卡余额密钥
     */
    public static String USER_OPERA_UPDATE_MONEY = "QWERTYUIOP";
    /**
     * 人工退还押金,订单号退款
     */
    public static String DEPOSIT_OPERA_UPDATE_MONEY = "ZXCVBNM";
    /**
     * 删除设备
     */
    public static String ACCOUNT_OPERA_DEL_MACHINE = "ASDFGHJKL";

    @Value("${ADMIN_OPERA_PSW:QWERTYUIOP}")
    public void initAdminOperaPsw(String operaPsw) {
        ADMIN_OPERA_PSW = operaPsw;
    }

    @Value("${USER_OPERA_UPDATE_MONEY:QWERTYUIOP}")
    public void setUserOperaUpdateMoney(String userOperaUpdateMoney) {
        USER_OPERA_UPDATE_MONEY = userOperaUpdateMoney;
    }

    @Value("${DEPOSIT_OPERA_UPDATE_MONEY:ZXCVBNM}")
    public void setDepositOperaUpdateMoney(String depositOperaUpdateMoney) {
        DEPOSIT_OPERA_UPDATE_MONEY = depositOperaUpdateMoney;
    }

    @Value("${ACCOUNT_OPERA_DEL_MACHINE:ASDFGHJKL}")
    public void setAccountOperaDelMachine(String accountOperaDelMachine) {
        ACCOUNT_OPERA_DEL_MACHINE = accountOperaDelMachine;
    }

}